package com.commander.spring.cloud.dao.order;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import lombok.Data;

import java.util.Date;

/**
 * description:
 * <p>
 * Date: 2020-06-05
 * <p>
 * Time: 15:52
 *
 * @author zhangxin
 */
@TableName("test_order")
@Data
public class OrderEntity {
	
	@TableId
	private String orderNo;
	private String userId;
	private int state;
	@Version
	private long version;
	@TableField(updateStrategy = FieldStrategy.NEVER)
	private Date createTime = new Date();
	@TableField(update="now()")
	private Date lastUpdateTime = new Date();
	
}
